// 设置验证登录中间件
let middleFn = (req,res,next)=>{
    if(req.session.username){
       //已登录
       next()
    }else{
       //未登录
       res.redirect('/login');
    }
};

module.exports = middleFn;